// Pass Groups
// (c) jimon game studio

#ifndef JEH_JEPASSGROUPS
#define JEH_JEPASSGROUPS

#include "jeMaterial.h"

namespace je
{
	namespace scene
	{
		//! Pass Group
		enum RenderPassGroup
		{
			//! Solid Objects (With Lighting)
			RPG_SOLID = 0,

			//! Solid Objects Without Lighting
			RPG_SOLID_WITHOUTLIGHTING = 1,

			//! Transparent Objects
			RPG_TRANSPARENT = 2,

			//! Max Pass Groups
			RPG_MAX = 3
		};

		//! Group Rights
		enum RenderPassGroupRights
		{
			//! Use Group Config
			RPTR_AUTO,

			//! Line Render
			RPTR_NONE,

			//! From front to back
			RPTR_ASCENDING,

			//! From back to front
			RPTR_DESCENDING
		};

		//! Convertor
		inline RenderPassGroup RenderMaterialToRenderPassGroupConverter(video::jeMaterial * Material)
		{
			switch(Material->Type)
			{
			case video::MT_SOLID:
				return RPG_SOLID;
				break;
			case video::MT_ALPHABLEND:
			case video::MT_LIGHTBLEND:
			case video::MT_SHADEBLEND:
			case video::MT_ADDITIVEBLEND:
				return RPG_TRANSPARENT;
				break;
			default:
				return RPG_SOLID;
				break;
			}
		}
	}
}

#endif